import java.util.Scanner;

public class HJ1 {
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
        String str = s.nextLine();
        computeLength(str);
    }

    public static void computeLength(String str){
        String[] words = str.split(" ");//将字符串变成数组
        int wordsNum = words.length;//数据长度，length-1位就是最后一个单词
        int lastWordLen = words[wordsNum - 1].length();
        System.out.println(lastWordLen);
    }
}
